#!/bin/bash

if [ "$#" -ne "1" ]; then
	echo -e "\nUsage : $0 <path>\n"
	exit
fi

script_dir=$(cd "$(dirname "$0")"; pwd)

echo -e "\n-->> Install $1 <<--\n"

if [ -d "$script_dir/../../../$1/mt" ]; then 
	dst_folder="mt"
else
	dst_folder="bg"
fi 

\cp -vf $script_dir/../../*.h $script_dir/../../../$1/$dst_folder/h/.
\cp -vf $script_dir/../h/*.h $script_dir/../../../$1/$dst_folder/h/.
rm -fr $script_dir/../../../$1/$dst_folder/h/utils/*
\cp -vfr $script_dir/../h/utils/*.h $script_dir/../../../$1/$dst_folder/h/utils/

\cp -vf  $script_dir/../lib/libutils.a  $script_dir/../../../$1/$dst_folder/lib/32/libutils.a
\cp -vf  $script_dir/../lib/libutils_ubt_x64.a  $script_dir/../../../$1/$dst_folder/lib/ubt_64/libutils.a
\cp -vf  $script_dir/../lib/libutils_x64.a  $script_dir/../../../$1/$dst_folder/lib/64/libutils.a

echo -e "\nDone!!!\n"